 
#include <iostream>
#include <string>

int main()
{
    std::string s;
    std::cin >> s;
    for (char c : s){
        if (c == '(') {
            s += c;
        }
        if (c == ')') {
            if (s.length() > 0) {
                if (s[ s.length() - 1] == '('){
                    s.pop_back();
                }
            }
        }
    }
    if (s.length() > 0) {
        std::cout << "true" << std::endl;
    }
    else {
        std::cout << "false" << std::endl;
    }
    return 0;
} 